#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int n1 = 0, n2 = 0;
    scanf("%d %d", &n1, &n2);
    int i = 0;
    int count = 0;
    int sum = 0;
    if (n1 < -100 || n1>100 || n2 < -100 || n2>100)
        scanf("%d %d", &n1, &n2);
    for (i = n1; i <= n2; i++)
    {
        count++;
        printf("%5d", i);
        sum += i;
        if (count % 5 == 0)
            printf("\n");
    }
    if (count % 5 != 0)
        printf("\n");
    printf("Sum = %d", sum);
    return 0;
}
